﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using MyWCF.Demo.Client.Web.Code;

namespace MyWCF.Demo.Client.Web
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class GetChatRoomUserList : HttpHandlerBase ,IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            base.Init(context);

            long chatRoomId = 0;
            long.TryParse(Request.Form["ChatRoomId"], out chatRoomId);
            SerializeDataToResponseStream(ChatRoomManager.GetUserListByChatRoomId(chatRoomId));
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
